<!Doctype html>
<html>

<head>
    <title>oixan的博客</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html" ; charset="utf-8">
    <link rel="stylesheet" type="text/css" href="../css/blog.css">
</head>

<body>
    <div class="head">
        <div class="headnav">
            <div class="naveframe">
                <ul class="navlist">
                    <li>
                        <a href="../index.html">
                            主页
                        </a>
                    </li>
                    <li>
                        <a href="../bloglist.html">
                            博客
                        </a>
                    </li>
                    <li>
                        <a href="../about.html">
                            关于
                        </a>
                    </li>
                </ul>
            </div>
        </div>

        <div class="headtext">
            <div class="headtext1">世界很简单，人类很复杂。</div>
            <div class="headtext2">浮生若梦，寻寻觅觅。</div>
        </div>
    </div>

    <div class="contents-all">
        <div class="contents">

            <div class="frame">
                <div class="title">
                    <h3>本设备浏览器信息</h3>
                </div>
                <div class="dtime">时间：2018-06-15</div>
                <div class="detail">

                    <p>
                        本设备浏览器信息(方便看)。
                    </p>
                    <script>
                        //判断访问终端
                        var browser = {
                            versions: function () {
                                var u = navigator.userAgent,
                                    app = navigator.appVersion;
                                return {
                                    trident: u.indexOf('Trident') > -1,
                                    //IE内核
                                    presto: u.indexOf('Presto') > -1,
                                    //opera内核
                                    webKit: u.indexOf('AppleWebKit') > -1,
                                    //苹果、谷歌内核
                                    gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,
                                    //火狐内核
                                    firfox:u.indexOf('Firefox')>-1,
                                    //firfox
                                    chrome:u.indexOf('Chrome')>-1&&u.indexOf('Edge')==-1&&u.indexOf('OPR')==-1,
                                    //chrome
                                    Edge:u.indexOf('Chrome')>-1&&u.indexOf('Edge')>-1,
                                    //edge
                                    Opera:u.indexOf('OPR')>-1,
                                    //Opera
                                    mobile: !!u.match(/AppleWebKit.*Mobile.*/),
                                    //是否为移动终端
                                    ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
                                    //ios终端
                                    android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
                                    //android终端或者uc浏览器
                                    iPhone: u.indexOf('iPhone') > -1,
                                    //是否为iPhone或者QQHD浏览器
                                    iPad: u.indexOf('iPad') > -1,
                                    //是否iPad
                                    Wp:u.indexOf('WPDesktop')>-1,
                                    //WP手机
                                    webApp: u.indexOf('Safari') == -1,
                                    //是否web应该程序，没有头部与底部
                                    weixin: u.indexOf('MicroMessenger') > -1,
                                    //是否微信 （2015 - 01 - 22新增）
                                    qq: !!u.match(/\sQQ/i)
                                    //是否QQ
                                };
                            }(),
                            language: (navigator.browserLanguage || navigator.language).toLowerCase()
                        }

                        document.write("<br/>");
                        document.write("userAgent: " + navigator.userAgent); //用户代理
                        document.write("<br/>");
                        document.write("<br/>");
                        document.write("Version: " + navigator.appVersion); //浏览器版本
                        //判断是否IE内核
                        if (browser.versions.trident) {
                            document.write("<br/>");
                            document.write("内核 is IE");

                        }
                        if (browser.versions.weixin) {
                            document.write("<br/>");
                            document.write("weixin");
                        }
                        if (browser.versions.qq) {
                            document.write("<br/>");
                            document.write("qq");
                        }
                        
                        if (browser.versions.firfox) {
                            document.write("<br/>");
                            document.write("firfox");
                        }
                        if (browser.versions.chrome) {
                            document.write("<br/>");
                            document.write("chrome");
                        }
                        if (browser.versions.Opera) {
                            document.write("<br/>");
                            document.write("Opera");
                        }

                        //判断是否webKit内核
                        if (browser.versions.webKit) {
                            document.write("<br/>");
                            document.write("内核 is webKi");

                        }

                        //判断是否移动端
                        if (browser.versions.mobile || browser.versions.android ||browser.versions.Wp||browser.versions.ios) {
                            document.write("<br/>");
                            document.write("移动端,");
                        }
                        if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {

                            document.write("<br/>");
                            document.write("苹果,");
                            //苹果端
                        } else if (/(Android)/i.test(navigator.userAgent)) {
                            document.write("<br/>");
                            document.write("安卓,");

                            //安卓端
                        } else if(/(WPDesktop)/i.test(navigator.userAgent)){
                            document.write("<br/>");
                            document.write("WP,");

                            //WP端
                        }
                        else {
                            document.write("<br/>");
                            document.write("电脑,");
                            //pc端
                        };
                    </script>
                </div>
<a href="javascript:void(0)" onclick="showPg()">返回</a>
            </div>


        </div>
    </div>
    <div class="footer">
        <div class="footertext">©2018,oixan博客</div>
    </div>
    <span id="backtop" onclick="topFunction()">返回顶部</span>
</body>
<script  src="../js/fanhuiye.js"></script>
</html>